\usepackage{color}

\usepackage{subfigure}

\newcommand{\itemTag}[1]{{\bf #1.}}

%
% NOTE: hyperref and citesort are NOT COMPATIBLE
% use one or the other.
%
%\usepackage{citesort}

%% \usepackage[ps2pdf,
%% pdftitle={Nearly Free BFT},
%% pdfauthor={},
%% bookmarks,bookmarksopen,
%% pdfstartview={FitH},
%% colorlinks,linkcolor={black},citecolor={black}
%% ]
%% {hyperref}

%%%%%%%%%%%%%%%  circled numbers  %%%%%%%%%%%%%%%%%%
\newcommand{\circledNum}[1]{{\footnotesize{\mbox{$\bigcirc$}\kern-.75em #1}}}
\newcommand{\circledNumTwo}[1]{{\footnotesize{\mbox{$\bigcirc$}\kern-1em {\scriptsize #1}}}}

\newcommand{\circledone}{\ding{192}\xspace}
\newcommand{\circledtwo}{\ding{193}\xspace}
\newcommand{\circledthree}{\ding{194}\xspace}
\newcommand{\circledfour}{\ding{195}\xspace}
\newcommand{\circledfive}{\ding{196}\xspace}
\newcommand{\circledsix}{\ding{197}\xspace}
\newcommand{\circledseven}{\ding{198}\xspace}
\newcommand{\circledeight}{\ding{199}\xspace}
\newcommand{\circlednine}{\ding{200}\xspace}

\newcommand{\filledone}{\ding{202}\xspace}
\newcommand{\filledtwo}{\ding{203}\xspace}
\newcommand{\filledthree}{\ding{204}\xspace}
\newcommand{\filledfour}{\ding{205}\xspace}
\newcommand{\filledfive}{\ding{206}\xspace}




% %% ---------------------------------------
% %% change this to hide/show the grumblers
% %% and ``for our eyes only'' sections
% %% ---------------------------------------
\newboolean{publicversion}
\setboolean{publicversion}{true}
\newboolean{techreport}
\setboolean{techreport}{false}




%%%%%%%%%%%%%%%%% Note: use includegraphics for figures %%%%%%%%%%%%%%%

% Example:
% \includegraphics[bb=llx lly urx ury,angle=angle, width=h_length,
%  height=v_length,scale=factor,clip=true/false, draft=true/false]{filename}

%%%%%%%%%% Special latex formatting embedded in xfig output %%%%%%%%%
% (1) in xfig, mark text you want to get passed straight through to latex
%     bring up the "edit" dialog for the relevant text
%     -- set "font" and use one of the "Use Latex Fonts" options
%     -- set "special flag"
%
% (2) in xfig, export using the "Combined PDF/Latex (Both parts)" option
%
% (3) in latex document, include the file
%
%     e.g.,
%
% \centerline{\resizebox{3in}{!}{\input{fig1.pdf_t}}}
%
% NOTE: figures need to be in current directory. \input{figures/fig1.pdf_t} doesnt
% work because the .pdf_t file need to include the pdf file


%%%%%%%%%%%%%%%%%% Add comments to text %%%%%%%%%%%%%%%%%%

\newcommand{\textred}[1]{\begingroup \color{red} #1\endgroup}

\setboolean{publicversion}{false}
\ifthenelse{\boolean{publicversion}}
{\newcommand{\grumbler}[2]{}
\newcommand{\changebars}[2]{#1}}
{\newcommand{\changebars}[2]{{\tiny [check]}[{\em #1}] [{\sout{\em #2}}]}
\newcommand{\grumbler}[2]{\begin{quote}\sl{\bf #1:} #2\end{quote}}}

%\newcommand{\grumbler}[2]{\begin{quote}\sl{\bf #1:} #2\end{quote}}
%\newcommand{\grumbler}[2]{}

\newcommand{\lorenzo}[1]{\grumbler{Lorenzo}{#1}}
\newcommand{\mike}[1]{\grumbler{Mike}{#1}}
\newcommand{\prince}[1]{\grumbler{Prince}{#1}}
\newcommand{\yang}[1]{\grumbler{Yang}{#1}}
\newcommand{\mikeD}[1]{\grumbler{MikeD}{#1}}
\newcommand{\mw}[1]{\grumbler{MikeW}{#1}}
\newcommand{\manos}[1]{\grumbler{Manos}{#1}}
\newcommand{\review}[1]{\grumbler{Review}{\color{red}#1}}
\newcommand{\zr}[1]{\grumbler{ZR}{#1}}
\newcommand{\mwlouder}[1]{\textred{MikeW: #1}}
\newcommand{\ms}[1]{\footnotesize{MarkS:}{#1}}
\newcommand{\outline}[1]{\grumbler{outline}{#1}}
\newcommand{\outlineDone}[1]{}
\newcommand{\yangnew}[1]{\textred{#1}}


\newcommand{\wishlist}[1]{\grumbler{wish-list}{#1}}
\newcommand{\oldversion}[1]{\grumbler{old}{#1}}
\newcommand{\omitFromFinalVersion}[1]{\grumbler{omitFromFinalVersion}{#1}}
\newcommand{\omitForSpace}[1]{\grumbler{omitForSpace}{#1}}



%%%%%%%%%%%%%%%%%%% sitemize -- reduced interitem spacing %%%%%%%%%%%%%%%%%%%%

\newenvironment{sitemize}{\begin{itemize} \addtolength{\itemsep}{-5pt}} {\end{itemize}}
\newenvironment{senumerate}{\begin{enumerate}\addtolength{\itemsep}{-5pt}}{\end{enumerate}}

%%%%%%%%%%%%%%%%%%% diagonal line in table cell %%%%%%%%%%%%%%%%%%%%%%
\newcommand\diag[4]{%
  \multicolumn{1}{p{#2}|}{\hskip-\tabcolsep
  $\vcenter{\begin{tikzpicture}[baseline=0,anchor=south west,inner sep=#1]
  \path[use as bounding box] (0,0) rectangle (#2+2\tabcolsep,\baselineskip);
  \node[minimum width={#2+2\tabcolsep},minimum height=\baselineskip+\extrarowheight] (box) {};
  \draw (box.north west) -- (box.south east);
  \draw (box.north west) -- (box.south west);
  \node[anchor=south west] at (box.south west) {#3};
  \node[anchor=north east] at (box.north east) {#4};
 \end{tikzpicture}}$\hskip-\tabcolsep}}





